home *** CD-ROM | disk | FTP | other *** search
- _START move.l $4.w,a6
- lea (DOSName,pc),a1
- moveq #37,d0
- jsr (-552,a6) ; OpenLibrary()
- move.l d0,_DOSBase
- beq.s .FINISH
- lea (IntName,pc),a1
- moveq #37,d0
- jsr (-552,a6) ; OpenLibrary()
- move.l d0,_IntuitionBase
- beq.s .CLOSEDOS
- lea (GfxName,pc),a1
- moveq #37,d0
- jsr (-552,a6) ; OpenLibrary()
- move.l d0,_GfxBase
- beq.s .CLOSEINT
-
- xref _main
- jsr _main ; a6 is stored
- move.l d0,d2
-
- move.l _GfxBase,a1
- jsr (-414,a6) ; CloseLibrary()
- .CLOSEINT move.l _IntuitionBase,a1
- jsr (-414,a6) ; CloseLibrary()
- .CLOSEDOS move.l _DOSBase,a1
- jsr (-414,a6) ; CloseLibrary()
- .FINISH move.l d2,d0
- rts
- ****************************************
- xdef _DOSBase
- xdef _IntuitionBase
- xdef _GfxBase
- ****************************************
- _DOSBase dc.l 0
- _IntuitionBase dc.l 0
- _GfxBase dc.l 0
- ****************************************
- DOSName dc.b 'dos.library',0
- IntName dc.b 'intuition.library',0
- GfxName dc.b 'graphics.library',0
-